

<?php

include_once("../../config.php");
include "../../coresection/checkSession.php";
include "../../coresection/order-list.php";
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'repair'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-list-function.php"); 
?>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include '../../modules/head.php'; ?>
</head>

<body>

<?php include '../../modules/topbar.php'; ?>

<div class="setup_area">
    <?include '../../modules/sidebar-admin.php'?>

    <div class="header">
        <h1>维修记录列表</h1>
        <?php include '../../modules/header.php'; ?>
    </div>




    <div class="content_area">

        <div class="admin_left_area">
            <?include '../../model/slidebar.php'?>
        </div>


        <div class="main product-add-box">







    <a href="detail-add.php?nav-itemed=equipment" class="layui-btn" lay-submit lay-filter="formrentalAdd" >新增</a>
 
<div class="list-boxes">



<?php

if ($detailnum == 0) {
    echo "数据添加中";
}

?>




<table class="layui-table">
  <colgroup>
    <col width="60">
    <col width="100">
	<col > 
	<col > 
	<col > 
	<col > 
	<col > 
	<col > 
	<col width="200">
	
    <col>
  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
      <th>设备</th>
      <th>维修日期</th>
      <th>负责人</th>
      <th>归还日期</th>
      <th>状态</th>
      <th>维修备注</th>
      <th>操作</th>
    </tr> 
  </thead>
  <tbody>
    
	
	<?php  
	for ($i = 0; $i < $detailnum; $i++) {

    ?>

        <?$chepai=select_one_line_all_items($table_Prefix."equipment","nid = '".$detail[$i]['equipmentid']."'");?>


	<tr>
      <td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
        <td><?echo $chepai['name']?></td>
	  <td><?echo $detail[$i]['repairdate']?></td>
        <?$borrower=select_one_line_all_items($table_Prefix."employee","nid = '".$detail[$i]['borrower']."'");?>
	  <td><?echo $borrower["name"]?></td>
	  <td><?echo $detail[$i]['returndate']?></td>
	  <td><?echo $detail[$i]['status']?></td>
	  <td><?echo $detail[$i]['returnremark']?></td>
	  <td>
  <a href="detail-edit.php?nav-itemed=equipment&equipmentid=<? echo $detail[$i]['equipmentid']?>&nid=<? echo $detail[$i]['nid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
    <i class="layui-icon">&#xe642;</i>修改
  </a>


  <a href="javascript:void(0)" onclick="popupBox(<?php echo $detail[$i]['nid'] ?>)" class="delete layui-btn layui-btn-primary layui-btn-small" >删除
      <i class="layui-icon">&#xe640;</i> </a>


  </td> 
    </tr>
  <?php

}
?>

 
  </tbody>
</table>




 

</div>


<div class="list-box-function" <? if ($detailnum == 0) {
    echo "style" . "='display:none'";
} ?> >
    <div class="page-guide">

        <?php
        if ($nowpageid == 1) {
            ?>
            <!--现在页数在第一页的时候-->
            <span>首页</span>
            <span>前一页</span>
            <!--现在页数非第一页的时候-->
        <?php
        } else {
            ?>
            <!--现在页数非第一页的时候-->
            <a href="detail-list.php?sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?>">首页</a>
            <a href="detail-list.php?nowpageid=<?php echo $prepage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?>">前一页</a>
            <!--现在页数非第一页的时候-->
        <?php
        }
        ?>


        <!--开始列印出所有页码-->

        <?php
        $ii = 1;
        $iii = 1;

        while ($ii <= $page_count) {
            //首先判断是不是当前页

            if ($ii == $nowpageid) {
                echo "<span>" . $ii . "</span>";
            } else if ((($ii + 5) < $nowpageid) || (($ii - 5) > $nowpageid)) {
            } else {
                echo "<a href='";
                echo "detail-list.php?nowpageid=";
                echo $iii;
                echo "&sortby=";
                echo $sort_by;
                echo "&nid=";
                echo $trans_nid;
                echo "&sys_part=";
                echo $system_part;
                echo "'>";
                echo $iii;
                echo "</a>";
            }

            $ii++;
            $iii++;
        }
        ?>

        <!--列印出所有页码 结束-->


        <?php
        if ($nowpageid == $page_count) {
            ?>
            <!--现在页数在第一页的时候-->
            <span>后一页</span>
            <span>末页</span>
            <!--现在页数非第一页的时候-->
        <?php
        } else {
            ?>
            <!--现在页数非第一页的时候-->
            <a href="detail-list.php?nowpageid=<?php echo $nextpage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?>">后一页</a>
            <a href="detail-list.php?nowpageid=<?php echo $lastpage; ?>&sortby=<?php echo $sort_by; ?>&nid=<?php echo $trans_nid ?>&sys_part=<? echo $system_part ?>">末页</a>
            <!--现在页数非第一页的时候-->
        <?php
        }
        ?>


    </div>
    <!--翻页代码结束-->
</div>


<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>





<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include '../../modules/footer.php'; ?>
</body>
</html>
